package com.vl.excel.parseexcel.starter;

import com.vl.excel.parseexcel.exception.NoAVLException;
import com.vl.excel.parseexcel.parsevl.VlExcelParser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

@Component
public class RunAfterStart implements ApplicationRunner {
    @Autowired
    VlExcelParser parser;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        try {
            parser.parse();
        } catch (NoAVLException e) {
            System.err.println("没有对应的账户分类:" + e.getMessage());
        }
    }
}
